#include "cusernetwork.h"



CUserNetwork::CUserNetwork(QObject *parent)
    :QObject(parent)
{
    m_pNetwork = new CNetwork;

    m_pNetwork->initialize();

    m_pNetwork->openSession();

    connect(m_pNetwork, SIGNAL(downloadProgressSignal(qint64,qint64)),
            this, SLOT(downloadProgress(qint64, qint64)) );
    connect(m_pNetwork, SIGNAL(downloadFinishedSignal()),
            this, SLOT(downloadFinished()));
}

CUserNetwork::~CUserNetwork()
{
    m_pNetwork->closeSession();

    delete m_pNetwork;
}

void CUserNetwork::request(int command, QString ipAddress, QString *arg, int count)
{
    m_pNetwork->request(command, ipAddress, arg, count);
}

void CUserNetwork::downloadFinished()
{
    int k = 0;
    k++;
    // for the core business to do

}

void CUserNetwork::downloadProgress(qint64 bytesReceived, qint64 bytesTotal)
{
    int k = 0;
    k++;
    // for the core business to do
}

